package com.asl.website.sysJoinMain.domain;

/**
 * @author 482944566@qq.com
 * @version 1.0
 * @date 2025-05-21
 */

import com.asl.website.common.Language;

/**
 * 加入我们页面响应DTO
 */
public class JoinUsDTO {
    private String mainTitle;
    private String subTitle;
    private String imagePath;
    private String language;

    // 构造方法
    public JoinUsDTO(SysJoinMain content, String language) {
        this.language = language;
        this.imagePath = content.getImagePath();

        switch (Language.fromCode(language)) {
            case EN_US:
                this.mainTitle = content.getMainTitleEnUs();
                this.subTitle = content.getSubTitleEnUs();
                break;
            case DE_DE:
                this.mainTitle = content.getMainTitleDeDe();
                this.subTitle = content.getSubTitleDeDe();
                break;
            default: // 默认中文
                this.mainTitle = content.getMainTitleZhCn();
                this.subTitle = content.getSubTitleZhCn();
        }
    }

    // getters
    public String getMainTitle() {
        return mainTitle;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public String getImagePath() {
        return imagePath;
    }

    public String getLanguage() {
        return language;
    }
}